{include file="header.html"}

<script type="text/javascript">
//<!CDATA[
$(function(){
	$("#comsub").live('click',function(){
		/* 是否有选择 */
		if($('.checkitem:checked').length == 0){    //没有选择
			alert('请选择要退回的信息');
			return false;
		}
		/* 获取选中的项 */
		var items = '';
		$('.checkitem:checked').each(function(){
			items += this.value + ',';
		});
		items = items.substr(0, (items.length - 1));
		$('.fixedBg').fadeIn(100);
		$('.win_box').slideDown(200);
		$("#sub_id").val(items);
	})
	$("#cancel").live('click',function(){
		busy=false;
		var id =  $("#sub_id").val();
		if(id=='' ){
			alert('请选择要退回的信息');
		}
		var content = $("#content").val();
		$.ajax({
			type: "POST",
			url: 'index.php?app=auth&act=refuse',
			data: {id:id,content:content},
			dataType: "json",
			success: function(data){
				if(data.done){
					$('.fixedBg').hide();
					$('.win_box').hide();
					alert('退回成功');
					location.reload();
				}
			},
			error:function(){
				busy=false;
			}
		});
	})
	$(".fixedBg").click(function(){
		$('.fixedBg').hide();
		$('.win_box').hide();
	})
});
//]]>
</script>

<style>
	.win_box{
		z-index: 9999;
		position: fixed;
		top: 30%;
		left: 50%;
		width: 400px;
		border-radius: 5px;
		border: solid 2px #666;
		background-color: #fff;
		display: none;
		box-shadow: 0 0 10px #666;
		margin-left: -200px;
	}
	.fixedBg {
		display: none;
		position: fixed;
		z-index: 9998;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-color: #000000;
		opacity: 0.5;
		filter: alpha(opacity=50);
	}
</style>
<div id="rightTop">
	<p>认证管理</p>
	<ul class="subnav">
		<li><span>{$lang.manage}</span>
		</li>
	</ul>
</div>
<div class="mrightTop">
	<div class="fontl">
		<form method="get">
			<div class="left">
		
				<input type="hidden" name="app" value="auth" />
                <input type="hidden" name="act" value="index" />
				<!--认证用户:
	            <input class="queryInput" type="text" name="a_username" value="{$smarty.get.a_username}" />-->
				申请手机号:
				<input class="queryInput" type="text" name="zm_user_name" value="{$smarty.get.zm_user_name}" />
				车牌号:
				<input class="queryInput" type="text" name="a_vhc_code" value="{$smarty.get.a_vhc_code}" />
				<!--驾驶证号:
				<input class="queryInput" type="text" name="a_driver_licence" value="{$smarty.get.a_driver_licence}" />-->
				认证状态:
                <select class="querySelect" id="type_id" name="type_id">
                <option value="">{$lang.select_pls}</option>
                {html_options options=$types selected=$smarty.get.type_id}
                </select>
                <input type="submit" class="formbtn" value="{$lang.query}" />
          
			</div>
		</form>
	</div>
	<div class="clear:both;"></div>
</div>
<div class="tdare">
	<table width="100%" cellspacing="0" class="dataTable">
		<!--{if $auth}-->
		<tr class="tatr1">
			<td width="20" class="firstCell"><input type="checkbox"
				class="checkall" />
			</td>
		
		<td>认证状态</td>
			<!--<td align="left">认证用户</td>-->
			<td align="left">申请手机号</td>
			<td>认证类型</td>
			<td>车牌号</td>
			<td>车型</td>
			<td>车长</td>
			<td>载重</td><!--
			<td>驾驶证号</td>-->
			<td>申请时间</td>
			<td>认证人员</td>
			<td>认证时间</td>
			<td style="text-align: center;width: 100px">操作</td>
		</tr>
		
		<!--{/if}-->
		<!--{foreach from=$auth item=w}-->
		<tr class="tatr2">
		    <td class="firstCell">{if $w.a_authed!=1} <input type="checkbox" class="checkitem" value="{$w.a_tid}"/>{/if}</td>
		
			<td>{if $w.a_authed==0}申请中{/if}{if $w.a_authed==1}已认证{/if}{if $w.a_authed==2}已拒绝{/if}</td>
			<td>{$w.zm_user_name|escape}</td>
			<!--<td>{$w.a_username|escape}</td>-->
			<td>{if $w.a_type==0}实名认证{/if}{if $w.a_type==1}车辆认证{/if}{if $w.a_type==2}单位认证{/if}</td>
			<td>{$w.a_vhc_code}</td>
			<td>{$w.a_vhc_model}</td>
			<td>{$w.a_vhc_size}</td>
			<td>{$w.a_vhc_weight}</td><!--
			<td>{$w.a_driver_licence}</td>-->
			<td>{$w.a_apply_date}</td>
			
           <td>
              {$w.user_name}
           </td>
            <td>
              {if $w.a_auth_date}{$w.a_auth_date|date:Y-m-d H:i}{else}{/if}
           </td>
                       <td><a href="index.php?app=auth&amp;act=pics&amp;id={$w.a_tid}" target="_blank">查看照片</a>
                       {if $w.a_authed!=1}|<a name="drop" href="javascript:drop_confirm('{$lang.drop_confirm}', 'index.php?app=auth&amp;act=drop&amp;id={$w.a_tid}');">{$lang.drop}</a>{/if}
            </td>
		</tr>
		<!--{foreachelse}-->
		<tr class="no_data">
			<td colspan="7">{$lang.no_data}</td>
		</tr>
		<!--{/foreach}-->
	</table>
	<!--{if $auth}-->
	<div id="dataFuncs">
		<div class="pageLinks">{include file=page.bottom.html}</div>
		<div id="batchAction" class="left paddingT15" style="padding-top: 10px;">
			&nbsp;&nbsp;<input class="formbtn batchButton" type="button"
				value="{$lang.drop}" name="id" uri="index.php?app=auth&act=drop"
				presubmit="confirm('{$lang.drop_confirm}');" />&nbsp;&nbsp;<input class="formbtn batchButton" type="button"
				value="认证" name="id" uri="index.php?app=auth&act=authentication"
				presubmit="confirm('确认要认证吗?');" />&nbsp;&nbsp;
			<!--<input class="formbtn batchButton" type="button" value="lang.update_order" name="id" presubmit="updateOrder(this);" />-->
		</div>
		<div class="left paddingT15" style="padding-top:10px; ">
			&nbsp;&nbsp;
			<input class="formbtn" type="button" value="退回" name="id" id="comsub"/>
			&nbsp;&nbsp;
		</div>
		<div class="clear:both;"></div>
	</div>
	<div class="clear"></div>
	<!--{/if}-->
</div>
<div class="win_box">
	<div class="win_box_title" style="text-align: center;padding-top: 15px;">
		退回说明
	</div>
	<div style="padding: 15px 0 0 0;text-align: center;">
		<input type="hidden" name="id" id="sub_id" value="" />
		<textarea name="content" id="content" style="width: 90%;height: 100px;padding: 5px;" placeholder="退回说明"></textarea>
		<p style="padding: 10px 0;"><input type="button" value="确定退回" class="formbtn" id="cancel" /></p>
	</div>
</div>
<div class="fixedBg">&nbsp;</div>
{include file="footer.html"}